#include "node.hpp"

#include <iostream>
#include <string>
using namespace std;

#include "btree.hpp"

node::node()
{
    val = -1;
    lchild = nullptr;
    rchild = nullptr;
}

node::node(int val)
{
    this->val = val;
    lchild = nullptr;
    rchild = nullptr;
}

node::~node()
{
    cout << "delete node " << this->val << endl;
    delete lchild; // tips: delete nullptr is leagle!
    delete rchild;
}